function tr_onmouseover(element) {
   var oTR = getElement(element, "TR");
   if (oTR != null && !eval(oTR.active)) {
      oTR.style.backgroundColor = "#FFFFCC";
   }
}

function tr_onmouseout(element) {
   var oTR = getElement(element, "TR");
   if (oTR != null && !eval(oTR.active)) {
      oTR.style.backgroundColor = "";
   }
}

function tr_onclick(element) {
   var oTR = getElement(element, "TR");
    // var oTABLE = getElement(oTR, "TABLE");
   var oTABLE = oTR.parentNode.parentNode;
   if (oTABLE != null) {
      if (typeof(oTABLE.activeRow) != "undefined" && oTABLE.activeRow != null) {
         oTABLE.activeRow.style.backgroundColor = "";
         oTABLE.activeRow.style.color = "";
         oTABLE.activeRow.active = "false";
      }

      if (oTR != null) {
         oTR.style.backgroundColor = "#FFFF99";
         oTR.style.color = "red";
         oTR.active = "true";
         oTABLE.activeRow = oTR;
      }
   }
}

function getElement(src, tagName) {
   var obj = src;
   while (obj != null && obj.tagName != tagName) {
   obj = obj.parentElement;
   }
   return obj;
}
